<template>
	<view class="page-container container">
		<view class="list" v-if="goods.id">
			<view class="list-item" v-for="(item, index) in Object.keys(goods.hcb)" :key="index">
				<view class="title">
					<text>{{ item }}</text>
				</view>
				<view class="text">
					<text>{{ goods.hcb[item] }}</text>
				</view>
			</view>
		</view>
		<!-- 悬浮按钮 -->
		<view class="fixed-btn-box">
			<view class="fixed-btn common-btn-bg-color" @click="confirm">
				<text>确定</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				goods: {}
			};
		},
		onLoad(options) {
			if (options.data) {
				const value = decodeURIComponent(options.data)
				const _value = JSON.parse(value)
				console.log("_value", _value)
				this.goods = _value
			}
		},
		methods: {
			confirm() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
.container {
	padding: 30rpx 24rpx;
	background-color: #fff;
	min-height: 100vh;
	padding-bottom: 200rpx;
}

.list {
	.list-item {
		padding: 26rpx 0;
		border-bottom: 2rpx solid #F5F5F5;
		display: flex;
		align-items: center;
		justify-content: space-between;
		
		.title {
			font-weight: bold;
			font-size: 34rpx;
			color: #333333;
		}
		
		.text {
			font-weight: bold;
			font-size: 34rpx;
			color: #333333;
		}
	}
}

.fixed-btn-box {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 22rpx;
	padding-bottom: 68rpx;
}

.fixed-btn {
	height: 96rpx;
	border-radius: 80rpx;
	font-weight: bold;
	font-size: 36rpx;
	color: #FFFFFF;
	text-align: center;
	line-height: 96rpx;
}
</style>
